<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Iframe Ajax</title>
	<script type="text/javascript" src="./upload/webtoolkit.aim.js"></script>
	<script type="text/javascript">
		function startCallback() {
			// make something useful before submit (onStart)
			return true;
		}
 
		function completeCallback(response) {
			// make something useful after (onComplete)
			document.getElementById('nr').innerHTML = parseInt(document.getElementById('nr').innerHTML) + 1;
			document.getElementById('r').innerHTML = response;
		}
	</script>
</head>
 
<body>
 
	<form action="xx" method="post" onsubmit="return AIM.submit(this, {'onStart' : startCallback, 'onComplete' : completeCallback})">
		<div><label>Opis:</label> <input type="text" class="butt2" name="form[name]" /></div>
		<div><label>Plik:</label> <input type="file" name="form[file]" /></div>
		<div><input type="submit" value="Zapisz" /></div>
	</form>
 
	<hr/>
 
	<div># of submited forms: <span id="nr">0</span></div>
	<div>last submit response (generated by form action - index.php file): <pre id="r">
</pre>
</div>
 
</body>
</html>